home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
ivbsrc
/
resource.frm
< prev
next >
Wrap
Text File
|
1995-05-08
|
2KB
|
85 lines
VERSION 2.00
Begin Form Form1
Caption = "Get Free Resources"
ClientHeight = 2130
ClientLeft = 1440
ClientTop = 1830
ClientWidth = 3030
Height = 2535
Left = 1380
LinkMode = 1 'Source
LinkTopic = "Form1"
ScaleHeight = 2130
ScaleWidth = 3030
Top = 1485
Width = 3150
Begin CommandButton Command1
Caption = "Get Resources"
Height = 375
Left = 720
TabIndex = 0
Top = 1560
Width = 1575
End
Begin TextBox Text3
Height = 375
Left = 1800
TabIndex = 3
Top = 1080
Width = 975
End
Begin TextBox Text2
Height = 375
Left = 1800
TabIndex = 2
Top = 600
Width = 975
End
Begin TextBox Text1
Height = 375
Left = 1800
TabIndex = 1
Top = 120
Width = 975
End
Begin Label Label3
Caption = "User Resources"
Height = 255
Left = 120
TabIndex = 6
Top = 1080
Width = 1575
End
Begin Label Label2
Caption = "GDI Resources"
Height = 255
Left = 120
TabIndex = 5
Top = 600
Width = 1455
End
Begin Label Label1
Caption = "System Resources"
Height = 255
Left = 120
TabIndex = 4
Top = 120
Width = 1575
End
End
Declare Function GetFreeSystemResources Lib "User" (ByVal fuSysResource As Integer) As Integer
Const GFSR_SYSTEMRESOURCES = 0
Const GFSR_GDIRESOURCES = 1
Const GFSR_USERRESOURCES = 2
Sub Command1_Click ()
X% = GetFreeSystemResources(GFSR_SYSTEMRESOURCES)
Text1.Text = Str$(X%) + "%"
X% = GetFreeSystemResources(GFSR_GDIRESOURCES)
Text2.Text = Str$(X%) + "%"
X% = GetFreeSystemResources(GFSR_USERRESOURCES)
Text3.Text = Str$(X%) + "%"
End Sub